<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@include file="../common/common.jspf"%>
<script type="text/javascript" src="${ctx}/js/order/edit.js"></script>
<script>
			layui.use('laydate', function(){
			  var laydate = layui.laydate;
			  
			  var start = {
			    min: laydate.now()
			    ,max: '2099-06-16 23:59:59'
			    ,istoday: false
			    ,choose: function(datas){
			      end.min = datas; //开始日选好后，重置结束日的最小日期
			      end.start = datas //将结束日的初始值设定为开始日
			    }
			  };
			  
			  var end = {
			    min: laydate.now()
			    ,max: '2099-06-16 23:59:59'
			    ,istoday: false
			    ,choose: function(datas){
			      start.max = datas; //结束日选好后，重置开始日的最大日期
			    }
			  };
			  $('#LAY_demorange_s').onclick = function(){
				 alert(1);
			    start.elem = this;
			    laydate(start);
			  }
			  $('#LAY_demorange_e').onclick = function(){
				  alert(2);
			    end.elem = this
			    laydate(end);
			  } 
			  
			});
		</script>
<style type="text/css">
.col-sm-2 {
	width: 15%;
	float: left;
}

.col-sm-4 {
	width: 30%;
	float: left;
}
</style>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post" style="width:95%;margin-left: 25px;"
		action="${ctx}/order/updateOrder">
		<input type="hidden" value="${order.orderId}" name="orderId" id="orderId">
		<section class="panel panel-default">
		   <div class="form-group">
			<%-- 	<label class="col-sm-2 control-label">发货状态</label>
				<div class="col-sm-4">
					<select class="form-control" name=shipStatus id="shipStatus">
						<option value="">请选择</option>
						<option value="0" <c:if test="${order.payStatus=='0'}">selected</c:if>>未发货</option>
						<option value="1" <c:if test="${order.payStatus=='1'}">selected</c:if>>已发货</option>
						<option value="2" <c:if test="${order.payStatus=='2'}">selected</c:if>>部分发货</option>
						<option value="3" <c:if test="${order.payStatus=='3'}">selected</c:if>>部分退货</option>
						<option value="4" <c:if test="${order.payStatus=='4'}">selected</c:if>>已退货</option>
						<option value="5" <c:if test="${order.payStatus=='5'}">selected</c:if>>已签收</option>
						<option value="6" <c:if test="${order.payStatus=='6'}">selected</c:if>>e贸易订单，已填写运单号，待申报</option>
					</select>
				</div> --%>
				<label class="col-sm-2 control-label">快递单号</label>
				<div class="col-sm-4">
					<input type="text" class="form-control"  placeholder="请输入快递单号" value="${order.expressCode}" name="expressCode" id="expressCode" maxlength="30" >
					<input type="hidden" value="${order.expressName}"  name="expressName" id="expressName" >
					<input type="hidden" value="1" name="shipStatus" id ="shipStatus"> <%--默认已发货 --%>
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-2 control-label">选择快递</label>
				<div class="col-sm-4">
					<input type="hidden"  id="shipMethod"  name ="shipMethod" value="${order.shipMethod}"/>
					<select id="expressId" name="expressId"  onchange="expressOnchang(this)" class="form-control m-b"
						tabindex="-1">
					</select>
				</div>
				<label class="col-sm-2 control-label">发货时间</label>
				<div class="col-sm-4">
                    <c:set var="now" value="<%=new java.util.Date()%>" />                    
					<input class="form-control layui-input" name="shipTimeStr" id="LAY_demorange_s" value="<c:if test="${not empty order.shipTime}"><fmt:formatDate value="${order.shipTime}" type="date" pattern="yyyy-MM-dd HH:mm:ss"/></c:if><c:if test="${ empty order.shipTime}"><fmt:formatDate value="${now}" type="date" pattern="yyyy-MM-dd HH:mm:ss"/></c:if>"  onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"><!-- onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" -->
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">				
				<label class="col-sm-2 control-label">选择快递</label>
				<div class="col-sm-4">
					<input type="text" class="form-control"  value="" disabled="disabled" name="code" id="code" maxlength="30">
				</div>
				<label class="col-sm-2 control-label">快递费用</label>
				<div class="col-sm-4">
					<input type="text" class="form-control"  value="${order.shipMoney}" disabled="disabled" name="shipMoney" id="shipMoney" maxlength="30">
				</div>
			</div>
		<%-- 	<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">				
				<label class="col-sm-2 control-label">快递单号</label>
				<div class="col-sm-10">
					<input type="text" class="form-control"  placeholder="请输入快递单号" value="${order.expressCode}" name="expressCode" id="expressCode" maxlength="30" >
					<input type="hidden" value="order.expressName"  name="expressName" id="expressName" >
				</div>
			</div> --%>
			<div class="line line-dashed line-lg pull-in"></div>
			<%-- <div class="form-group">				
				<label class="col-sm-2 control-label">订单备注</label>
				<div class="col-sm-10">
				     <textarea rows="5" cols="70" name="memo" id="memo">${order.memo}</textarea>
				</div>
			</div> --%>
		<footer class="panel-footer text-right bg-light lter">
			<button type="submit" class="btn btn-success btn-s-xs">确认发货</button>
		</footer> </section>
	</form>
	<script type="text/javascript">
		onloadurl();
	</script>
</body>
</html>